//
// Created by Tony on 2024/6/6.
//

#include "ObjectTable.h"
#include "Object.h"

namespace RtData {

uint32_t ObjectTable::addObject(Object* object) {
    mObjectTable.push_back(object);
    return mObjectTable.size() - 1;
}

Object* ObjectTable::getObject(uint32_t index) {
    if (index >= mObjectTable.size()) {
        return nullptr;
    }
    return mObjectTable[index];
}

} // namespace RtData